package com.seaboxdata.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seaboxdata.dao.DataShareInfoDao;
import com.seaboxdata.dao.ShareTableInfoDao;
import com.seaboxdata.entity.DataShareInfo;
import com.seaboxdata.entity.ServiceInfo;
import com.seaboxdata.entity.ShareTableInfo;
import com.seaboxdata.service.DataShareInfoService;
import com.seaboxdata.service.ShareTableInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @author
 * @create 2021-02-19 11:08
 **/
@Service("dataShareInfoService")
public class DataShareInfoServiceImpl extends ServiceImpl<DataShareInfoDao, DataShareInfo> implements DataShareInfoService {

    @Autowired
    private DataShareInfoDao dataShareInfoDao;

    @Override
    public List<DataShareInfo> getDataShareDbInfo() {
        return dataShareInfoDao.getDataShareDbInfo();
    }

    @Override
    public String getDataSharedSize() {
        String sharedSize = dataShareInfoDao.getDataSharedSize();
        return sharedSize;
    }

    @Override
    public String getSpaceSizeByTable(String tableName) {
        return dataShareInfoDao.getSpaceSizeByTable(tableName);
    }

    /**
     * 获取实时总数据量
     */
    @Override
    public List<DataShareInfo> getActualTimeDataInfo() {
        return dataShareInfoDao.getActualTimeDataInfo();
    }


    /**
     * 获取实时表数据量
     *
     * @return
     */
    @Override
    public Integer getTableSizeByTable(String tableName) {
        return dataShareInfoDao.getTableSizeByTable(tableName);
    }


    /**
     * 获取数据汇聚表空间
     *
     * @return
     */
    @Override
    public String getMppDbSpaceDataInfo() {
        return dataShareInfoDao.getMppDbSpaceDataInfo();
    }


}
